package com.ase.leetcode;

import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

/**
 * @author gyhstart
 * @create 2021/3/10 - 15:43
 * 数字颠倒
 **/
public class leetcode3 {
    public static void main(String[] args) throws IOException {
        InputStream stream = System.in;
        byte[] bytes = new byte[1024];
        int l = 0;
        while ((l = stream.read(bytes)) > 0) {
            String str = new String(bytes, 0, l - 1);
            char[] chars = str.toCharArray();
            char[] newChar = new char[chars.length];
            for (int i = 0; i < chars.length; i++) {
                newChar[i] = chars[chars.length - i - 1];
            }
            System.out.println(new String(newChar));
        }
    }
}
